<!DOCTYPE html>
<html>
<head>
  <title>Rookie</title>
  <%= stylesheet_link_tag    "application", :media => "all" %>
  <%= javascript_include_tag "application" %>
  <%= csrf_meta_tags %>
  <style type="text/css">
  	body{
  		background-color: #D8EFF7;
  	}
  </style>
</head>
<body>
<div id="head">
	<div id="image">
	<%= link_to image_tag("bk.png", :border => 0,:width =>130, :height => 130), root_path%>
	</div>
<div id="header">
	
	<div id="image">
	<%= link_to image_tag("en.jpg", :border => 0,:width =>40, :height => 30), "http://localhost:3000/en" %>
	<%= link_to image_tag("vi.jpg", :border => 0,:width =>40, :height => 30), "http://localhost:3000/vi" %>
	</div>
	
	<div id="login" style="float: right; padding-right: 10px; width: 230px; height: 18px;">
		
		<% if(session[:user_id]) %>
			 <% @user = User.find(session[:user_id]) %>
		<%= t(:hellouser)%>	  <%= link_to @user.studentId , @user %> 
		<%= link_to t(:edit), edit_user_path(@user) %> |
			 <%= link_to t(:exit), logout_path %>
			 
		<% else %>
			<%= link_to t(:login), login_path%> /
			<%= link_to t(:register), new_user_path%>
		<% end %>
		
		
	</div>
	
	<div id="h-login" style="width: 550px;"><br>
		
		<h1><%= t :title%></h1>
	</div>
	
	
</div>
</div>

<div id="main">
	
	<div id="lefter">
	<div class="danhmuc"> 
		<div id="chuleft" style="float: left; padding-left: 47px;padding-top: 5px;"> <%= t(:category) %></div>
		</div>

	<div id="timkiem" style="padding: 10px;">

<br>
<%= link_to t(:findbyname), :controller => "booktables", :action => "searchName"%>
<br></br>
<%= link_to t(:findbyauthor), :controller => "booktables", :action => "searchAuthor"%>
<br></br>
<%= link_to t(:findbyCategory), :controller => "booktables", :action => "searchCategory"%>
</div>



	</div>
	<div id="middler">
		<%= yield %>
	</div>
	<div id="righter">
		<div class="danhmuc">
			<div id="churight" style="float: left; padding-left: 47px;padding-top: 5px;"><%= t(:intro)%></div>
			</div>
			
<ul>
<li>	<%= t(:intro1)%>	 </li>
<li>	<%= t(:intro2)%>	
		</li>
		

<li><%= t(:intro3)%>  </li>
<li><%= t(:intro4)%>  </li>
</ul>
</p>
		</div>

	</div>
	<div id="ender">
	</div>
</div>
<div id="footer">
	<%= t :copyright%><br>
	<%= t :designby%><br>
	<%= t :teacher%><br>
	<%= t :technology%><br>
</div>
</body>
</html>
